package com.recharge.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.recharge.common.result.ResultDO;
import com.recharge.core.entity.OrderEntity;
import com.recharge.domain.query.OrderQueryDO;
import com.recharge.domain.vo.OrderDO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author reagan
 * @since 2020-08-19
 */
public interface OrderService extends IService<OrderEntity> {

    /**
     * 添加临时订单
     * @param domain 临时订单
     * @return
     */
    public ResultDO add(OrderDO domain);


    /**
     * 返回订单详情
     * @param id
     * @return
     */
    public ResultDO get(String id);

    /**
     * 修改订单
     * @param domain
     * @return
     */
    public ResultDO edit(OrderDO domain);

    public ResultDO saveUpdate(OrderDO domain);

    /**
     * 查找订单列表
     * @param domain
     * @return
     */
    public ResultDO find(OrderQueryDO domain);

    /***
     * 统计订单
     * @param domain
     * @return
     */
    public ResultDO reportorder(OrderQueryDO domain);


    /***
     * 重置订单
     * @param domain
     * @return
     */
    public ResultDO resettingOrder(OrderDO domain);


    /**
     * 订单定时请求上游供应商
     * @return
     */
    //public void orderSendProvider();

    public void exec(OrderDO orderDO) throws Exception;


    /**
     * 订单定时请求上游供应商
     * @return
     */
    //public void syncUpdateOrder();

    public ResultDO getRechagerStatusOrder(String orderNo);
    /**
     *
     * @param order
     * @return
     */
    public ResultDO editStatus(OrderDO order);



    /**
     *  根据订单ID列表查询订单列表
     * @param orderIdList
     * @return
     */
    public ResultDO selectListByIds(List<String> orderIdList);


    public ResultDO getByMerchantSerialNumber(String serialNumber);

    /**
     *  查询归属地
     * @param rechargeNumber
     * @return
     */
    public ResultDO queryCellCore(String rechargeNumber);

    /**
     * 订单退款
     * @param domain
     * @return
     */
    public ResultDO orderRefund(OrderDO domain);

    /**
     * 订单异步回调
     * @param domain
     * @return
     */
    public ResultDO callBack(OrderDO domain);

    /**
     * 批量回调
     * @param domain
     * @return
     */
    public ResultDO callBackBatch(OrderDO domain);

    /**
     * 根据供货流水号查询订单
     * @param outTradeNo 供货流水号
     * @return
     */
    ResultDO getByProviderOrderSerialNo(String outTradeNo);

    /**
     * 批量修改订单
     * @param orderList
     * @return
     */
    public ResultDO updateBatchOrderById(List<OrderDO> orderList);

    /**
     * 订单导出
     * @param query
     * @return
     */
    public ResultDO findList(OrderQueryDO query);
}
